package yth.api.train.utils;
 
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class DateUtil {
 
	public static String Date2String(Date date){
		 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
	     return sdf.format(date);
	}
	
	public static Date String2Date (String date){
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
        try {
			return sdf.parse(date);
		} catch (ParseException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			return null;
		}
	}
	 
	public static void main(String[] args) {
//		Date date= String2Date("2018-03-21 17:08");
//		System.out.println(date);
		
		for (int i = 0; i < 10; i++) {
			if(i==1) {
				continue;
			}
			System.out.println(i);
		}
	}
}
